#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
    int seconds = 0,hour = 0,min = 0,s=0;
    scanf("%d", &seconds);
    hour = seconds / 3600;
    min = (seconds / 60) % 60;
    s = seconds % 60;
    printf("%d %d %d", hour, min, s);
    return 0;
}